<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {

    public function index(){
        /***********************获取分类文章*************************/
        $company_id = I('get.company_id');
        session('admin.company_id', $company_id);
        $newsData =catGetArticle('工作动态');
        $informData = catGetArticle('通知公告');
        $ruleData = catGetArticle('法规制度');
        $eduData = catGetArticle('廉政教育');
        $picData = catGetArticle('幻灯片');
//        dump($picData);exit();
        $this->assign([
            'workData' =>$newsData,
            'informData' =>$informData,
            'ruleData' =>$ruleData,
            'eduData' =>$eduData,
            'picData' =>$picData,
        ]);


        $model = D('Admin/Slide');
        $imgData = $model->search('30');

         $menuModel = D('Admin/Menu');
         $menuData = $menuModel->search('30','1')['data'];

//        var_dump(intval($menuData[0]['is_show']));exit();
        $this->assign(array(
            'imgData' => $imgData['data'],
            'imgDate' => $imgData['page'],
            'menuData' => $menuData,
        ));
        $this->display();
    }
}
